﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using Demo.Model;

using Pampa.CRUD;
using Pampa.CRUD.Core;

public partial class EntityView : AbstractPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string entityName = "Demo.Model.Customer, Demo.Model";
        string strId = Request["id"];
        int id = (strId == null) ? 1 : int.Parse(strId);

        try
        {
            this.EntityView1.Entity = EntityManager.Load(entityName, id);
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
            Response.End();
        }
    }
}
